import PopupMenu from "./PopupMenu";
import SoundsManager from "../soundmanager";
import Utils from "../utils";
import ButtonObject from "../ButtonObject";

export default class LoseMenu extends PopupMenu {
    constructor() {
        super('lost_panel');
        // var t = this;
        // this.showDelay = 0;
        // var lose = Utils.createBitmap("lose");
        // lose.pivotX = lose.width / 2;
        // lose.pivotY = lose.height / 2;
        // lose.x = 347;
        // lose.y = 18;
        // this.baseSprite.addChild(lose);
        // this.char = new AnimatedNode(App.game.animationManager.getAnimation("Char lose"), 1 / 30, null);
        // this.char.x = 100;
        // this.char.y = 300;
        // this.baseSprite.addChild(this.char);
        // var btn = new ButtonObject(6, function (e) {
        //     t.loadMainMenu(e);
        // }, this.baseSprite, 500, 140);
        // this.animatedButtons.push(btn);
        // this.clickables.push(btn);
        // btn = new ButtonObject(5, function (e) {
        //     t.restartLevel(e);
        // }, this.baseSprite, 340, 140);
        // this.animatedButtons.push(btn);
        // this.clickables.push(btn);
    }

    show() {
        super.show();
        SoundsManager.instance.playSound("fail");
        SoundsManager.instance.pauseMusic();
    };
    hide() {
        super.hide();
        SoundsManager.instance.resumeMusic();
    };

}